import React, { useEffect } from "react";
import isLogin from "@/utils/isLogin";
import { useNavigate } from "react-router-dom";
import { Toast } from "antd-mobile";

type Props = {};

export default function index({}: Props) {
  const navigate = useNavigate();
  useEffect(() => {
    if (!isLogin()) {
      Toast.show({
        icon: "fail",
        content: "请先登录！",
        afterClose() {
          navigate("/login");
        },
      });
    }
  }, []);
  return <div>index</div>;
}
